<?php

use think\facade\Route;
use app\admin\middleware\LoginMiddleware;
use app\admin\middleware\AuthMiddleware;
use app\admin\middleware\OperationLog;

Route::group('dict', function () {

    Route::group('type', function () {
        //字典类型列表
        Route::get('lists', 'dict.Type/lists');
        //添加字典类型
        Route::post('add', 'dict.Type/add');
        //编辑字典类型
        Route::post('edit', 'dict.Type/edit');
        //字典类型详情
        Route::get('detail', 'dict.Type/detail');
        //删除字典类型
        Route::delete('delete', 'dict.Type/delete');
    });

    Route::group('data', function () {
        //字典数据列表
        Route::get('lists', 'dict.Data/lists');
        //添加字典数据
        Route::post('add', 'dict.Data/add');
        //编辑字典数据
        Route::post('edit', 'dict.Data/edit');
        //字典数据详情
        Route::get('detail', 'dict.Data/detail');
        //删除字典数据
        Route::delete('delete', 'dict.Data/delete');
    });

})->middleware([
    LoginMiddleware::class,
    AuthMiddleware::class,
    OperationLog::class
]);